
#pragma once

#include <ctime>

#include "raw_socket.h"


namespace sock {

	class Selector {
	public:
		Selector();
		~Selector();

		void set( RawSocket &sock );
		int	 select( time_t timeout );
		int  select();
		bool isset( RawSocket & sock );
		void clear();
		void erase( RawSocket &sock );
	private:
		struct Impl;
		Impl *_pimpl;

		Selector( const Selector & other );
		Selector & operator=( const Selector & other );
	};
	
}